package com.huawei.appgallery.datastorage.database.impl.process;

import android.content.ContentValues;
import android.database.Cursor;
import android.text.TextUtils;
import java.lang.reflect.Field;
import o.blw;
import o.bmc;
import o.bmg;

public final class EnumProcess implements bmc<Enum> {
    public /* synthetic */ void ˋ(ContentValues contentValues, String str, Object obj) {
        ˎ(contentValues, str, (Enum) obj);
    }

    public String ˊ() {
        return "TEXT";
    }

    public void ˎ(ContentValues contentValues, String str, Enum enumR) {
        contentValues.put(str, ˋ(enumR));
    }

    private String ˋ(Enum enumR) {
        String str = "";
        if (enumR != null) {
            return enumR.name();
        }
        return str;
    }

    public void ˎ(blw o_blw, Field field, Cursor cursor, int i) {
        Object string = cursor.getString(i);
        if (!TextUtils.isEmpty(string)) {
            try {
                field.set(o_blw, Enum.valueOf(field.getType(), string));
            } catch (IllegalAccessException e) {
                bmg.ˊ.ˏ("EnumProcess", "put value failed:IllegalAccessException:" + o_blw.getClass().getSimpleName());
            } catch (NullPointerException e2) {
                bmg.ˊ.ˏ("EnumProcess", "put value failed:NullPointerException:" + o_blw.getClass().getSimpleName());
            } catch (Exception e3) {
                bmg.ˊ.ˏ("EnumProcess", "put value failed:Exception:" + o_blw.getClass().getSimpleName());
            }
        }
    }
}
